<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>加油站加油案例</title>
	<script>
		while (true) {
			var a = prompt("请你输入汽油编号");
			var b = prompt("请问你要加多少升油");
			switch (+a) {
				case 92:
					if (b >= 20) {
						alert(b * 5.9);
					} else {
						alert(b * 6);
					}
					break;
				case 97:
					if (b >= 30) {
						alert(b * 6.95);
					} else {
						alert(b * 7);
					}
					default:
						document.write("您输入的有误");
						break;
			}
		}
	</script>
</head>

<body>
</body>

</html>